package com.cetc.sdp.kmga.cs.audit;

import java.io.Serializable;

/**
 * @description:
 * @author： DengQiang
 * @date: 2017/8/25 15:05
 */
public class IpAccessPair implements Serializable {

    private String clientIp;

    private String serverIp;

    public IpAccessPair(String clientIp, String serverIp) {
        this.clientIp = clientIp;
        this.serverIp = serverIp;
    }

    public String getClientIp() {
        return clientIp;
    }

    public String getServerIp() {
        return serverIp;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        IpAccessPair that = (IpAccessPair) o;

        if (clientIp != null ? !clientIp.equals(that.clientIp) : that.clientIp != null) {
            return false;
        }
        return serverIp != null ? serverIp.equals(that.serverIp) : that.serverIp == null;
    }

    @Override
    public int hashCode() {
        int result = clientIp != null ? clientIp.hashCode() : 0;
        result = 31 * result + (serverIp != null ? serverIp.hashCode() : 0);
        return result;
    }
}
